package com.webank.weideagroup2.chain;

import java.util.Random;

public class ChainBuilder {

    private static Chain chain;

    public static Chain newInstance() {
        if (chain != null) {
            return chain;
        } else {
            synchronized (ChainBuilder.class) {
                if (chain == null) {
                    // 初始化Chain
                    chain = new ChainImpl();
                }
                return chain;

            }
        }
    }
}
